//
//  BottomView.m
//  恒记
//
//  Created by Ctair on 16/5/17.
//  Copyright © 2016年 can. All rights reserved.
//

#import "BottomView.h"

@implementation BottomView

- (void)drawRect:(CGRect)rect {
    
    [[UIColor whiteColor] setStroke];//设置画笔颜色
    UIBezierPath *path = [UIBezierPath bezierPath];
    
    // 设置起点
    [path moveToPoint:CPM(0, 33 * PROPORTION_H)];
    [path addLineToPoint:CPM(0, 90 * PROPORTION_H)];
    [path addLineToPoint:CPM(SCREEN_WIDTH, 90 * PROPORTION_H)];
    [path addLineToPoint:CPM(SCREEN_WIDTH, 33 * PROPORTION_H)];
    [path addLineToPoint:CGPointMake(SCREEN_WIDTH / 2 + 45 *PROPORTION_W, 33 * PROPORTION_H)];
    [path addQuadCurveToPoint:CPM(SCREEN_WIDTH / 2 - 45 *PROPORTION_W, 33 * PROPORTION_H) controlPoint:CPM(SCREEN_WIDTH / 2, - 15)];
    [path closePath];
    
    // 设置拐角处的效果为圆角
    [path setLineJoinStyle:kCGLineJoinRound];
    // 设置结束处的效果为圆角
    [path setLineCapStyle:kCGLineCapRound];
    [path stroke];
    [RGB_COLOR(245, 191, 165, 1) setFill];
    [path fill];
}


@end
